﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CreateTrip.aspx.cs" Inherits="CreateTrip" %>
<%@ Register Src="CommonSearch.ascx" TagName="CommonSearch" TagPrefix="uc2" %>
<%@ Register Src="Header.ascx" TagName="Header" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>发布活动</title>
    <link href="images/favicon.ico" rel="shortcut icon" type="image/x-icon">
    <link rel="stylesheet" type="text/css" href="style/common.css" />
    <link rel="stylesheet" type="text/css" href="style/Segment/Header.css" />
    <link rel="stylesheet" type="text/css" href="style/Segment/Search.css" />
    <link rel="stylesheet" type="text/css" href="style/Segment/Tripplan.css" />
    <link rel="stylesheet" type="text/css" href="style/Segment/Creatrip.css" />
    <link rel="stylesheet" type="text/css" href="style/Segment/Registerandsign.css" />    
    <link rel="stylesheet" type="text/css" href="style/Segment/Footer.css" />
    <script src="js/footrip.js" type="text/javascript">
    </script>
    <script src="js/TimeControl.js" type="text/javascript">
    </script>
    <script type="text/javascript">
    var hasComplete = false;
    var clickBtnSucc = false;
    var tabIdList = [{ID:"tabPage1",Ctl:"btnPage1"},{ID:"tabPage2",Ctl:"btnPage2"}];    
    window.onunload = function()
    {
        if(!hasComplete && $("txtEhId").value)
        {
            DeleteEventH($("txtEhId").value);
        }
    }
    
    function btnInitialTrip_onclick() 
    {
        InitialTrip("btnAdd2");
    }
        
    function btnAdd2_onclick() 
    {
        InsertEventDetailView();
    }
    
    function btnNext_onclick() 
    {
        tabSelectChange(tabIdList,"tabPage2");
        CreateTrip2();
    }
    
    function checkCreateTrip3()
    {
        var ret = true;
        if(!regularExpressionValid('txtEventTitle',EVE_TITLE_REGULAR_EXPRESSION,'tabPage2ErrorPanel','标题输入有误!'))
            ret = false;
        if(!regularExpressionValid('txtEventMemo',EVE_MEMO_REGULAR_EXPRESSION,'tabPage2ErrorPanel','介绍输入有误!'))
            ret = false;
        hasComplete = ret;
        return ret;
    }
    
    function EventInfoClick()
    {
        if(!clickBtnSucc)
        {
            var errorPanel = "tabPage1ErrorPanel";
            regularExpressionValid('ToCity',TOCITY_REGULAR_EXPRESSION,errorPanel,'目的城市 输入有误!');
        }
        else
        {
            tabSelectChange(tabIdList,'tabPage2');
        }
    }
    </script>
</head>
<body id="normalbody" onload="SelectAllCityView()">
    <form id="form1" runat="server" enctype="multipart/form-data">
         <asp:ScriptManager ID="ScriptManager1" runat="server">
       <Services>
           <asp:ServiceReference Path="WSLogin.asmx" />
       </Services>
     </asp:ScriptManager>
<div id="container">
    <uc1:Header ID="Header1" runat="server" />
    <uc2:CommonSearch ID="CommonSearch1" runat="server" />

   <!--Main-->

      <!--活动行程-->
      
      <div id="planTime">
         <div id="Unscheduled" class="TimeTitle">
         <table border="0" cellspacing="0" cellpadding="0"><tr><td class="LeftBg"></td><td class="CenterBg" valign="middle"><a href="tripplan_2.html">未定义行程</a></td><td class="RightBg"></td></tr></table>
         <!--<div class="TimeBox">

         </div>-->
         </div>

      </div>
      
      <!--右边-->
      <div id="creatbody">
      <h1>发布新活动...</h1>
      <div class="boxTitle">
        <a id="btnPage1" class="tab_select" href="#1" onclick="return tabSelectChange(tabIdList,'tabPage1')">想去哪儿</a> | 
        <a id="btnPage2" href="#2" onclick="EventInfoClick();return false;">活动信息</a>
      </div>
      <div class="bodyItem">
      <table id="tabPage1" style="display:block">
      <tr>
        <td colspan="2"><div id="tabPage1ErrorPanel" class="warnYellow"></div></td>
      </tr>
      <tr>
      <td style="width:70px;" valign="top"><b>出发地：</b></td>
      <td style="width:210px;"><font class="font16"><b><span id="fromCityName" style="color: #666666"><%=fromCityName %></span></b></font><input id="fromCityId" type="hidden"
              value="5" /><input id="txtEhId" type="hidden" runat="server" /></td>
      <td></td>
      </tr>
      <tr>
          <td valign="top"><b>目的地：</b></td>
          <td colspan="2">
              <div id="toCities">

              </div>
          </td>
      </tr>
      <tr>
      <td></td>
      <td><input id="ToCity" type="text" style="width:200px;" tabIndex=1 list="0" islist="true" />
          请直接输入您想去的目的地或风景点<p>
              <input id="btnInitialTrip" class="butn_green" onclick="return btnInitialTrip_onclick()"
                  type="button" value="添 加" />
              <input type="button" value="添 加" class="butn_green" id="btnAdd2" style="display:none" onclick="btnAdd2_onclick()" /></p></td>
      <td></td>
      </tr>
      <tr><td colspan="3">
          <div id="createTripStep2" style="width:100%">
              <table>
                  <tr>
                  <td style="width: 67px"><b>开始时间：</b></td>
                  <td><input type="text" id="startDate" readonly="readonly" onclick="new Calendar(0).show(this)" /></td>
                  <td></td>
                  </tr>
                  <tr>
                  <td style="width: 67px"><b>持续天数：</b></td>
                  <td><input type="text" style="width:20px;" id="dueDays" /> 天</td>
                  <td></td>
                  </tr>
                  <tr>
                  <td valign="top" style="width: 67px"><b>活动地图：</b></td>
                  <td colspan="2"><div class="map"><img src="images/citymap.jpg" /></div></td>
                  </tr>
                  <tr>
                  <td style="width: 67px"></td>
                  <td><input type="button" class="butn_blue" value="下一步" id="btnNext" onclick="return btnNext_onclick()" /> 继续完善活动信息</td>
                  <td></td>
                  </tr>
              </table>
          </div>
      </td></tr>
      </table>
      
      
      <table id="tabPage2" style="display:none">
      <tr>
        <td colspan="2"><div id="tabPage2ErrorPanel" class="warnYellow"></div></td>
      </tr>
      <tr>
      <td style="width:160px;" valign="top"><h2>当前头像</h2><div class="eventHeadPic"><img src="images/city1.jpg" /></div></td>
      <td valign="top">
      <ul>
      <li><h2>活动名称：</h2><input type="text" style="width:430px;" id="txtEventTitle" runat="server" onblur="regularExpressionValid('txtEventTitle',EVE_TITLE_REGULAR_EXPRESSION,'tabPage2ErrorPanel','标题输入有误!')" /></li>
      <li><h2>活动头像：</h2><input id="fuPicURL" type="file" size="60" name="" style="background:none;" runat="server"/><br />足迹网会自动选择一张图片作为你的活动首页照片，当然你也可以自己上传图片<br />作为你的活动封面</li>
      <li><b>分享活动：</b>
        <select style="width:120px; font-size:12px;" name="" id="listPublicType" runat="server">
        <option value="">分享所有人</option>
        <option value="">只分享给好友</option>
        <option value="">仅自己可见</option>
        </select>
      </li>
      <li><h2>活动简介：</h2><textarea class="tripInfo" cols="4" rows="4" id="txtEventMemo" runat="server" onblur="regularExpressionValid('txtEventMemo',EVE_MEMO_REGULAR_EXPRESSION,'tabPage2ErrorPanel','介绍输入有误!')"></textarea></li>
      <li><h2>活动标签：</h2><input type="text" style="width:430px;" id="txtEventNote" /></li>
      <li><h2>高级选项：</h2></li>
      </ul>
      <p><input type="submit" class="butn_blue" value="下一步" onclick="return checkCreateTrip3()" id="btnSubmit" /></p>
      </td>
      </tr>
      </table>
      
      </div>
      </div>
      
      <!---->
      <div class="clear"></div>
      <!---->
   

   
   

<!---Footer--->
<div id="footer">
<span>Copyright © 2008 Footrip.com All Rights Reserved</span>
<ul>
<li><a href="">关于我们</a> | </li>
<li><a href="">广告联系</a> | </li>
<li><a href="">隐私保护</a> | </li>
<li><a href="">特色功能</a> | </li>
<li><a href="">使用帮助</a> | </li>
<li><a href="">建议反馈</a> | </li>
</ul>
<div class="clear"></div>
</div>

</div>
    </form>
</body>
</html>
